<? 
 
 $index     =  rand ( 0 , sizeof($this->groups) - 1 );
 $groupName = $this->randomName; // $this->groups[$index]->Name;
 $url       = "/request/group/name/{$groupName}/size/-1";
 $url       = "/request/picture/name/{$groupName}/index/{$this->random[0]->id}";
 $subject   = $this->random[0]->subject;
?> 

<table><tr><td>


<!-- begin viewport -->
<div class="viewport shadow-black" style="background:url(<?= $url ?>);background-size:768px;">


<!-- begin viewport content -->
  <div style="padding:10px;"> 

   <table width="100%">
       <tr>
        <td width="50%"><div class="glow-blue" style="font-size:20pt;color:white;">CloudNZB</div></td>
        <td width="50%" align="right" style="font-size:10pt;color:white;">
        
          Search: <input type="text" onchange="location.href='/request/findgroup/param/'+this.value"/>

        </td>
       </tr>
   </table>

    <div style="font-size:12pt;"><a style="color:yellow" href="<?= $this->url(array( 
                                                      'controller' => 'request', 
                                                      'action'     => 'pagegroup', 
                                                      'groupname'  => $groupName, 
                                                      'pagenumber' => '1')) ?>"><?= $groupName ?></a></div> 
        <blockquote style="width:384px;padding-top:10px">
       <?=html_entity_decode( $subject ) ?>
    </blockquote> 
<img width="1" height="200" src="/images/clear.gif"/>

 

<!-- begin group select list -->
<div align="right">
         <select onchange="location.href='/request/pagegroup/pagenumber/1/groupname/' + this.value">
<option value="/">Jump to group</option>


<?php foreach ($this->fullList as $name): ?>
  <option value="<?= $name ?>"
><?= $name ?></option>
<?php endforeach ?> 

         </select>

</div>
<!-- end group select list -->


  

  </div>
<!-- end viewport content -->


</div> 
<!-- end viewport -->





<? foreach ($this->groups as $group): 

$async  = "/request/pagegroup/groupname/{$group->Name}/pagenumber/1/async/1";  
$filter = "{$async}/filter/picture";  
?>

 <div class='home'  style="background:url(/request/group/name/<?= $group->Name ?>/size/256);background-size:248px;">               
   <table cellspacing='0' cellpadding='4' width='100%' height="174">
    <tr>
      <td valign="top">

 <div align='left' id="d<?= $group->Name ?>" style="color:#F6E4CC" class="shadow-black">
<a class="shadow-black" href="#" style="font-size:9pt" onclick="LoadPageByPattern('<?= $async ?>', 'd<?= $group->Name ?>', 
                                                      '/group/list/group/<?= $group->Name ?>/page/1')"
  ><?= $group->Name; ?></a>  
<br/>

<a class="shadow-black" style="font-size:7pt;color:white" 
   onclick="LoadPageByPattern('<?= $filter ?>', 'd<?= $group->Name ?>', 
                                                      '/group/list/group/<?= $group->Name ?>/filter/picture/page/1')"
   href="#"
  >Find pictures</a>

</div>


      </td>
    </tr>
     <tr>
       <td align='center' valign="bottom">              
          <a href='/favorites/load/group/<?= $bookmark->Group ?>/page/<?= $this->page ?>/key/<?= $bookmark->Id ?>'>               
             <!-- <img src="/request/group/name/<?= $group->Name ?>/size/144"
               onerror="this.src='/images/file-broken.png'"/> -->
           </a>  
       </td>
     </tr>
   </table> 

  

 </div> 

 


 
<?php endforeach ?> 

</td></tr></table>




<div align="center" class="footer" style="background-color:#8FBCDB;padding:20px;border-top:solid 1px gray">
        <?  $p = new Default_Model_Paginator;
            $p->PageSize = 6;
             echo $p->Pages(sizeof($this->fullList), $this->page, "/"); ?>


</div> 


